I'm currently scanning my local CPAN for a survey of CHANGES files, and am getting dozens of errors on Archive::Extract via Module::Extract. A sample:
Invalid header block at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Read error on tarfile (missing data) 'Logfile-Radius-1.14/Radius.pm' at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Could not open file '/tmp/e0hrZzpCtR/Logfile-Radius-1.14/t/radius.t': Permission denied at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 724
Could not extract 'Logfile-Radius-1.14/t/radius.t' at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 724
Unable to extract '/home/ron/.cpan/sources/authors/id/P/PA/PAULG/Logfile-Radius-1.14.tar.gz': Could not extract 'Logfile-Radius-1.14/t/radius.t' at /usr/local/share/perl/5.8.8/Module/Extract.pm line 146
Invalid header block at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Couldn't read chunk at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Invalid header block at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Invalid header block at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
Read error on tarfile (missing data) 'ptkFAQ-0_03/qna9.2.html' at offset unknown at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 702
error: Unsupported compression combination: read 6, write 0
at /usr/local/share/perl/5.8.8/Module/Extract.pm line 146
Extraction of 'ERG-1.13/Changes' from '/home/ron/.cpan/sources/authors/id/P/PH/PHOENIXL/extensible_report_generator_1.13.zip' failed at /usr/local/share/perl/5.8.8/Module/Extract.pm line 146
Could not update timestamp at /usr/local/share/perl/5.8.8/Archive/Extract.pm line 724
Anyone seen this? And even better: What to do?
And worse, by default it often won't tell you the name of offending file :-((.
I've just manually run tar xvzf on a failed module, DBIx-Perform-0.694.tar.gz, and it worked perfectly. Strange. Let's hope it's not telling me something about my hard disk.
Re:Use a better module
Ron Savage on 2008-05-05T03:58:35
$many x $thanx;
I tried Archive::Extract
in four of the tarballs mentioned in the error messages you gave:
All these tarballs seem "not good" from the point of view of Perl/CPAN extraction modules that Archive::Extract
uses. These are Archive::Tar
and Archive::Zip
.
This is a bad thing that these modules are not as robust as possible, but they are good enough for the effort that CPAN volunteer developers put on these. But, on the other hand, all of these distributions work ok (at least on Ubunty 7.04) if you instruct Archive::Extract
to prefer the binary utilities (like gzip, tar, unzip) over the Perl modules.
So when I tried each one of the four mentioned distributions with this code, they extracted with no problems:
#!/usr/bin/perl
use Archive::Extract ();
$Archive::Extract::PREFER_BIN = 1;
my $x = Archive::Extract->new( archive => shift );
$x->extract( to => 'tmp' ); # make sure the permissions of this directory is ok